<?php

namespace app\common\validate\shop;

use app\common\validate\BaseValidate;

class GoodsValidete extends BaseValidate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name|标题' => 'require|length:1,500',
        'category_id|分类' => 'require|number',
        'introduce|商品简介' => 'require|length:5,500',
        'price|价格' => 'require|number|min:0.1',
        'images|商品相册'=> 'require:length:500',
        'unit|单位'    => 'require|length:1,10',
        'num|商品数量' => 'require|number|min:1'
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];
    
}
